#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test Lisp support: lisp-format string with a loop.

cat <<\EOF > xg-ls-3.lisp
(gettext "~{~*~}")
EOF

: ${XGETTEXT=xgettext}
${XGETTEXT} --omit-header --no-location -d xg-ls-3.tmp xg-ls-3.lisp || Exit 1
LC_ALL=C tr -d '\r' < xg-ls-3.tmp.po > xg-ls-3.po || Exit 1

cat <<\EOF > xg-ls-3.ok
#, lisp-format
msgid "~{~*~}"
msgstr ""
EOF

: ${DIFF=diff}
${DIFF} xg-ls-3.ok xg-ls-3.po
result=$?

exit $result
